package com.zhuiyun.project.api.coachApply.mapper;

import com.zhuiyun.project.api.coachApply.entity.CoachApply;
import com.zhuiyun.project.api.coachApply.model.CoachApplyModel;
import com.zhuiyun.project.api.coachmanagement.model.CoachHandoverModel;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @ClassName CoachApplyMapper
 * @Description TODO 教练邀请码申请持久层
 * @Author wx
 * @Date 2023/12/4 9:20
 **/
@Mapper
public interface CoachApplyMapper {
    /**
    * @Author wx
    * @Description 添加邀请申请
    * @Date 2023/12/4 9:38
    * @Return
    * @param venueUniqueIdentifier
    */
    int addByInvitationCode(Integer id, String invitationCode, String venueUniqueIdentifier);

    /**
    * @Author wx
    * @Description 查询是否有该申请
    * @Date 2023/12/4 9:38
    * @Return
    * @param venueUniqueIdentifier
    */
    CoachApply selectByInvitationCode(Integer id, String invitationCode, String venueUniqueIdentifier);

    /**
     * @Author wx
     * @Description 根据邀请码查询邀请码申请的数据
     * @Date 2023/12/5 9:26
     * @Return
     * @param venueUniqueIdentifier
     */
    CoachApply selectCoachApplyByInvitationCode(String invitationCode, String venueUniqueIdentifier, Integer memberUserId);

    /**
     * @Author wx
     * @Description 根据邀请码查询教练申请
     * @Date 2023/12/5 15:46
     * @Return
     * @param coachCode
     */
    List<CoachApplyModel> selectCoachInfoByCode(String coachCode);

    /**
    * @Author wx
    * @Description 申请表状态修改
    * @Date 2023/12/5 18:50
    * @Return
    * @param memberUserId
    */
    int updateCoachCodeStatus(String coachCode, Integer memberUserId);
    //查询该学员是否申请
    List<CoachApply> selectByMemberId(CoachHandoverModel coachHandoverModel);

    CoachApply getCoachApplyStatus(String id);

    int addInvitationCode(CoachHandoverModel coachHandoverModel);

    int updateStatusById(int id);
}
